/*
 * Sample.h
 *
 *  Created on: 24/08/2011
 *      Author: luiz
 */

#ifndef SAMPLES_H_
#define SAMPLES_H_
#include <vector>
#include <string>

#include "../Model/EvaluationFunction.h"

class Samples {
	std::vector<double> samples;
	short averageCache;
	double average;
public:
	Samples();
	virtual ~Samples();

	void addSample(const double &value);

	double getAverage() ;
	double getSD() ;
	double getLowerValue() const;
	double getHigherValue() const;
	int getSize() const;

	void printValues();
	double getAvarageDeviation(double meanValue);


	double getEvaluationFunctionError(double expected_value, double factor, EvaluationFunction *function);

	double operator[](int i);
};
#endif /* SAMPLES_H_ */
